<extend name="Public/common"/>
<block name="othercss">

</block>
<block name="body">
<div class="mian" style="background-color: #f4f4f4">
    <div class="help">
        <div class="box">
            <div class="loc"><i class="icon iconloc"></i>您现在在这里：<a href="{:urlrotue('/')}">百宝库</a> > <a href="{:urlrotue('Member/index')}">个人中心</a> > <span class="on">退货及换货</span>
            </div>
            <div class="clearfix help_list">
                <div class="right">
                    <h2 class="title">退货及换货</h2>
                    <div class="sq_list">
                        <ul class="clearfix">
                            <li class="on">
                                <div class="sq1">申请退款</div>
                                <div class="sq2 icon"></div>
                                <div class="sq3">{$model.create_time|stringtime=1}</div>
                            </li>
                            <li class="on">
                                <div class="sq1">处理退款申请</div>
                                <div class="sq2 icon"></div>
                                <div class="sq3"></div>
                            </li>
                        
                            <li <if condition="$model['th_status'] eq 2">class="on" </if>>
                                <div class="sq1">完成</div>
                                <div class="sq2 icon"></div>
                                <div class="sq3"><if condition="$model['tui_time'] neq ''">{$model.tui_time|stringtime=1}</if></div>
                            </li>
                        </ul>
                    </div>
                    <div class="sq_pro">
                        <div class="right1">
                        
                           <if condition="$model['th_status'] eq 0">
                            <img src="{$theme_path}/images/cancel.png" width="55" height="55"/>
                            <div class="right2">退款已取消</div>
                            <elseif condition="$model['th_status'] eq 1" />
                            <img src="{$theme_path}/images/sq1.jpg" width="55" height="55"/>
                            <div class="right2">退款申请处理中....</div>
                            <div class="right3">我们正在审核您的退款申请，请您耐心等候！谢谢！</div>
                            <elseif condition="$model['th_status'] eq 2" />
                             <img src="{$theme_path}/images/finish.png" width="55" height="55"/>
                              <div class="right2">退款成功</div>
                             <elseif condition="$model['th_status'] eq 3" /> 
                                <div class="img"><img src="{$theme_path}/images/sq2.jpg"></div>
                             
                                 <div class="right2">审核通过....</div>
                                <if condition="$model['shouhuo'] eq '已收到货'">
                                 {:$model['kuaidi_no']?'<div class="right3">我们会在收到退货的第一时间完成退款，请耐心等待</div>':''}
                             <form name="frm1" id="frm1" onSubmit="return false;" method="post">
                              <dl class="right4">
                                <dd>快递公司：
                               <input type="text" class="input1"  name="kuaidi" id="kuaidi" value="{$model.kuaidi}"/>
                                </dd>
                                <dd>快递单号：<input type="text" class="input1"  name="kuaidi_no" id="kuaidi_no" value="{$model.kuaidi_no}"/></dd>
                                 <input type="hidden" name="id" id="id" value="{$model.id}" />
                                <dd><input type="button"  onclick="tuihuan_kuaidi_submit();"  class="input2"  value=" {:$model['kuaidi_no']?'修改物流单号':'提交物流单号'}" /></dd>
                            </dl>
                               </form>  
                                 </if>
                               <elseif condition="$model['th_status'] eq 4" /> 
                              <img src="{$theme_path}/images/no_pass.png" width="55" height="55"/>
                             <div class="right2">审核不通过</div>
                              <else/>
                              <img src="{$theme_path}/images/sq1.jpg" width="55" height="55"/>
                              <div class="right2">退款申请处理中....</div>
                              <div class="right3">我们正在审核您的退款申请，请您耐心等候！谢谢！</div>
                              
                              </if>
                              
                              
                            
                        </div>
                        <div class="left1">
                            <div class="title">我要退款商品</div>
                            <a class="clearfix cell1">
                                <div class="lans">
                                    <div class="name">{$model2.goods_name}
                                    </div>
                                    <div class="guige">{$model2.goods_spec}
                                    </div>
                                </div>
                                <div class="imgs">
                                    <img src="__ROOT__{$model2.goods_picture}" width="80" height="80"/>
                                </div>
                            </a>
                            <ul class="message">
                                <li class="clearfix">
                                  <div class="li1">收货地址：</div>
                                    <div class="li2">  {$model3.addr_realname}，{$model3.addr_phone}，<br>
                                    {$model3.addr_province}{$model3.addr_city}{$model3.addr_area}{$model3.addr_address}，<br>
                                    {$model3.zipcode}
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="li1">商品单价：</div>
                                    <div class="li2" style="color:#999999;">{$model2.goods_price}元     &nbsp;&nbsp;&nbsp;&nbsp;X{$model2.goods_num}(数量)</div>
                                </li>
                                <li class="clearfix">
                                    <div class="li1"> 小 计：</div>
                                    <div class="li2"><span style="color:#dd2727">¥</span><span style="color:#dd2727;font-size: 20px">{$model2['goods_price']*$model2['goods_num']}</span>元</div>
                                </li>
                                
                                      <li class="clearfix">
                                    <div class="li1"> 退款金额：</div>
                                    <div class="li2"><span style="color:#dd2727">¥</span><span style="color:#dd2727;font-size: 20px">{$model['price']}</span>元</div>
                                </li>
                                <li class="clearfix">
                                    <div class="li1 on">
                                        订单编号：<span class="mess">{$model3.order_no}</span>
                                        
                                    </div>
                                </li>
                               
                            </ul>
                        </div>
                    </div>
                </div>
                
                 <include file="Member:left_menu"/>
            </div>
        </div>
    </div>
</div>
</block>
<block name="otherjs">
 <script type="text/javascript">
	    layer.photos({
        photos: '.picture-list'
        ,anim: 5 
    });
	
	
/*****添加留言******/
function tuihuan_kuaidi_submit() {
    var kuaidi = $.trim($("#kuaidi").val());
	var kuaidi_no = $.trim($("#kuaidi_no").val());

	if (kuaidi == "") {
	
		 layer.tips('请填写快递名称', '#kuaidi',{ time: 1000, tips: [2,'#282828'] });
        $("#kuaidi").focus();
        return;
    }
	
	if (kuaidi_no == "") {
	  layer.tips('请填写快递单号', '#kuaidi_no',{ time: 1000, tips: [2,'#282828'] });
        $("#kuaidi_no").focus();
        return;
    }
		

	var index = layer.load(0, {shade: [0.5,'#999'] }); //0代表加载的风格，支持0-
    $.ajax({
        url: "{:U('Member/kuaidi_submit')}",
        data: $("#frm1").serialize(),
        cache: false,
        type: "POST",
        success: function (obj) {
            if (obj.title == 'success') {
			 layer.closeAll('loading');
			layer.alert(obj.msg, function(index){
              window.location.href="{:urlrotue('Member/tuihuan')}";
              layer.close(index);
              });   
               
            }
            else {
				 layer.closeAll('loading');
				layer.msg(obj.msg, {icon: 5}); 
            }
        },
        error: function () {
			 layer.closeAll('loading');
			layer.msg('提交出现错误！', {icon: 5}); 
        }
    });
  
}



    </script>
</block>
